<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script src="js/png.js?v={yun:}$config.cachecode{/yun}"></script>
<script>
  DD_belatedPNG.fix('#bg');
</script>
<![endif]-->
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>  
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script> 
<script src="js/show_pub.js?v={yun:}$config.cachecode{/yun}"></script> 
<script>  
function check_form(){
	var hot_pic=$("#hot_pic").val();//默认logo
	var pic=$("input[name=hot_pic]").val();
	var start = $("#time_start").val();	
	var end = $("#time_end").val();
	if(start==""||end=="")
	{ 
		parent.layer.msg('开始时间，结束时间不能为空！', 2, 8);
		return false
	}else{
		var st=toDate(start);
		var ed=toDate(end);
		if(st>ed){ 	
			parent.layer.msg('开始时间不得大于结束时间！', 2, 8);
			return false
		}
	}
	if(hot_pic=="" && pic==""){
		parent.layer.msg('企业展示LOGO不能为空！', 2, 8);
		return false
	}
}
</script>
<style>
* {margin: 0 ;padding: 0;}
body,div{ margin: 0 ;padding: 0;}
.table_form tr{height:40px;}
</style>
<title>后台管理</title>
</head>
<body> 
	<div id="houtai_div"  style="width:468px;height:450px; overflow:auto; overflow-x:hidden"> 
		<div class="common-form">
			<form name="myform" action="index.php?m=admin_hotjob&c=save" method="post" id="myform" enctype="multipart/form-data" onSubmit="return check_form();" target="supportiframe"> 
		   <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
			<table width="100%" class="table_form contentWrap"> 
				<tr>
					<td align="right"><div  style="width:90px;">企业名称:</div></td>
					<td id="comname" align="left">
					{yun:}$hotjob.username{/yun}<input name="username" type="hidden" value="{yun:}$hotjob.username{/yun}">
					</td>
				</tr>
				<tr>
					<td align="right">会员级别:</td>
					<td id="ratname" align="left">
						{yun:}$hotjob.rating{/yun}<input name="rating" type="hidden" value="{yun:}$hotjob.rating{/yun}">
                        <input name="rating_id" type="hidden" value="{yun:}$hotjob.rating_id{/yun}">
					</td>
				</tr>
				  <tr>
					<td align="right">企业展示LOGO:</td>
					<td id="logo" align="left">
                    <input type="hidden" name="defpic" id="hot_pic" value="{yun:}$hotjob.hot_pic{/yun}">
					<input type="file" name="hot_pic">
                     <div>{yun:}if $hotjob.hot_pic{/yun}<img src="{yun:}$config.sy_weburl{/yun}/{yun:}$hotjob.hot_pic{/yun}" width="185" height="75">{yun:}/if{/yun}</div>
					</td>
				</tr>
				<tr>
					<td align="right">服务价格:</td>
					<td align="left">
					<input type="text" name="service_price" id="service_price" class="input-text" size="5" value="{yun:}$hotjob.service_price{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">元
					</td>
				</tr>
				  <tr>
					<td align="right">开始时间:</td>
					<td align="left">
			 <link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/js/datepicker/css/font-awesome.min.css?v={yun:}$config.cachecode{/yun}" type="text/css">  
			<script src="{yun:}$config.sy_weburl{/yun}/js/datepicker/foundation-datepicker.min.js?v={yun:}$config.cachecode{/yun}"></script>
			<input id="time_start" class="input-text" type="text" readonly size="20" value="{yun:}$hotjob.time_start|date_format:'%Y-%m-%d'{/yun}" name="time_start"> 
					</td>
				</tr>
				  <tr>
					<td align="right">结束时间:</td>
					<td align="left">
			   <input id="time_end" class="input-text" type="text" readonly size="20" value="{yun:}$hotjob.time_end|date_format:'%Y-%m-%d'{/yun}" name="time_end">
			<script type="text/javascript"> 
			var checkin = $('#time_start').fdatepicker({
				format: 'yyyy-mm-dd',startView:4,minView:2 
			}).on('changeDate', function (ev) {
				if (ev.date.valueOf() > checkout.date.valueOf()) {
					var newDate = new Date(ev.date)
					newDate.setDate(newDate.getDate() + 1);
					checkout.update(newDate);
				}
				checkin.hide();
				$('#time_end')[0].focus();
			}).data('datepicker');
			var checkout = $('#time_end').fdatepicker({
				format: 'yyyy-mm-dd',startView:4,minView:2,
				onRender: function (date) {
					return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
				}
			}).on('changeDate', function (ev) {
				checkout.hide();
			}).data('datepicker');  
			</script>
					</td>
				</tr>
				<tr>
					<td align="right">备注:</td>
					<td id="beizhu" align="left">
				   <textarea name="beizhu" rows="3" cols="50" class="text">{yun:}$hotjob.beizhu{/yun}</textarea>
					</td>
				</tr>
				  <tr>
					<td align="right">排序:</td>
					<td align="left">
						<input class="input-text" id="sort" value="{yun:}$hotjob.sort{/yun}" name="sort" size="5"> 小前大后
					</td>
				</tr>
			<tr>
			<td colspan="2" align="center">
				<input name="uid" id="com_uid" type="hidden" value="{yun:}$hotjob.uid{/yun}">
				{yun:}if $hotjob.id{/yun}
					 <input id="hotjob_id"  name="id" type="hidden" value="{yun:}$hotjob.id{/yun}">
					<input class="admin_button" name="hotup" type="submit" value="修改" id="dosubmit">  
				{yun:}else{/yun}
				  <input class="admin_button" name="hotad" type="submit" value="提交" id="dosubmit">
				{yun:}/if{/yun}
			</td>
			 </table>
			 </form>
		</div> 
	</div>  
</body>
</html>